<div class="form" id="subform">
<?php if (!isset ($model)) $model= new LoginForm();
echo CHtml::beginForm(array('site/login')); ?>
	<div class="row">
		<?php echo CHtml::activelabel($model,'username'); ?>
		<?php echo CHtml::activeTextField($model,'username', array('style'=>'width:130px')); ?>
		<?php echo CHtml::error($model,'username'); ?>
	</div>

	<div class="row">
		<?php echo CHtml::activeLabelEx($model,'password'); ?>
		<?php echo CHtml::activePasswordField($model,'password', array('style'=>'width:130px')); ?>
		<?php echo CHtml::error($model,'password'); ?>

	</div>

	<div class="row rememberMe">
		<?php echo CHtml::activeCheckBox($model,'rememberMe'); ?>
		<?php echo CHtml::activeLabel($model,'rememberMe'); ?>
		<?php echo CHtml::error($model,'rememberMe'); ?>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton('Login').'     '.CHtml::link('Register', Yii::app()->createUrl('user/create')); ?>
	</div>

<?php echo CHtml::endForm() ?>
</div>